package cn.mw.service.impl;

import cn.mw.domain.Menu;
import cn.mw.mapper.MenuMapper;
import cn.mw.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl implements IMenuService {
    @Autowired
    private MenuMapper menuMapper;
    @Override
    public List<Menu> findAll() {
        return menuMapper.findAll();
    }

    @Override
    public Menu findOne(Long id) {
        return menuMapper.findOne(id);
    }

    @Override
    public void delete(Long id) {
        menuMapper.delete(id);
    }

    @Override
    public void update(Menu menu) {
        menuMapper.update(menu);
    }

    @Override
    public void add(Menu menu) {
        menuMapper.add(menu);
    }

    @Override
    public Menu getOne(Long id) {
        return menuMapper.findOne(id);
    }

    @Override
    public void getAdd(Menu menu) {
        menuMapper.add(menu);
    }

}
